<?php
$options = $this->friends;
$slbFriends = $this->formSelect('group_id',"",array('style'=>"min-width: 200px"),$options);

$linkImg = FILES_URL.'/developer/imgs/img110x110/';

if($this->Items['type_app']==1){
	$typeApp = "mọi lứa tuổi";
}
if($this->Items['type_app']==2){
	$typeApp = "lứa tuổi tử 4->6";
}
if($this->Items['type_app']==3){
	$typeApp = "lứa tuổi tử 7->9";
}
if($this->Items['type_app']==4){
	$typeApp = "lứa tuổi tử 10->12";
}
if(!isset($this->arrParam['challenge'])){
	$challenge = 0 ;
}else {
	$challenge = $this->arrParam['challenge'] ;
}
?>
<div class="container">
	<div class="sub-center-container">
		<div class="slide-show"></div>
		<div class="img-right"></div>
		 <div class="clear"></div>
		<form name="appForm" method="post" action=""enctype="multipart/form-data">
			<div class="toolbar">
				<a href="#"><?php echo $this->title?> </a>
				<a onclick="OnSubmitForm('<?php echo $this->baseUrl($this->currentController.'/article/id/'.$this->arrParam['id'].'/typePlay/1') ?>')" style="margin-left: 150px"> Đấu đơn</a>
				<a onclick="OnSubmitForm('<?php echo $this->baseUrl($this->currentController.'/article/id/'.$this->arrParam['id'].'/typePlay/2') ?>')" style="margin-left: 150px"> Đấu đội</a>
				<a onclick="OnSubmitForm('<?php echo $this->baseUrl($this->currentController.'/article/id/'.$this->arrParam['id'].'/typePlay/3') ?>')" style="margin-left: 150px"> Thách đấu</a>
			</div>
			
			<div class="list-game">
				<div class="article-header">
					<div class="article-img">
						<img alt="" src="<?php echo $linkImg.$this->Items['link_img']?>"
							width="110" height="85" border="5" style="border-radius: 5px">
					</div>
					<div class="article-header-des">
						<div class="download-game" onclick="OnSubmitForm('<?php echo $this->baseUrl($this->currentController)."/donwload/link/".$this->Items['link_app'] ?>')" >donwload</div>
						<div style="margin: 10px">
							<strong>Thể loại</strong> : <span style="color: #476DA4;"><?php echo $typeApp?>
							</span>
						</div>
						<div style="margin: 10px">
							<strong>Số người đã chơi</strong> : <span style="color: #476DA4;"><?php echo $this->Items['number_download']?>
							</span>
						</div>
						<?php if($this->arrParam['typePlay']!=1&&($challenge==0) ){?>
							<div class="list-friends">
								<?php echo $slbFriends?>
							</div>
						<?php }?>
						
					</div>
					<div class="thach-dau">
						<div id="startGame" class="thach-dau-button" onclick="ajaxSendRequestChallenge('<?php echo $this->baseUrl($this->currentController).'/send-request-challenge'?>')">
							<?php if($this->arrParam['typePlay']==1){?>
								đấu đơn
							<?php }else {if($challenge==0){?>
								Thách đấu
								<?php }else{?>
								Trả thách đấu
							<?php }}?>
						</div>
					</div>
				</div>
				<div class="clear"></div>
				<div class="article-title">Những người cùng chơi</div>
				<div class="list-online">
					<div class="next"></div>
					<div class="back"></div>
					không có người chơi nào cùng online!
				</div>
				
				<iframe src="http://localhost/TERRA/GameKhe/www/index.html" height="768px" width="1024px">
				  <p>Your browser does not support iframes.</p>
				</iframe>
				
				
				<br>
				<hr>
				<br>
				<div class="article-title">mô tả</div>
				<div class="article-content">
					<?php echo $this->Items['des_app']?>
				</div>
			</div>
		</form>
		<div class="clear"></div>

	</div>
	<!-- END: PAGINATION (FOOT) -->

	<?php  echo $this->render('index/categories/index.phtml')?>
</div>
<div class="to_top">
	<a id="to_top" href="#"><img src="<?php echo $this->imgUrl?>/to-top.png" /> </a>
</div>
</body>
</html>



